//
//  CHApiDefiner.h
//  CarOnlineConsult
//
//  Created by 黄卫 on 17/2/24.
//  Copyright © 2017年 huangwei. All rights reserved.
//


#ifndef CarOnlineConsult_CHApiDefiner_h
#define CarOnlineConsult_CHApiDefiner_h


//----------------------服务端请求接口类宏---------------------------

/**
 1.开发环境     http://192.168.1.121:9101/appServer/interface
 2.测试环境     http://192.168.1.201:8080/appServer/interface
 3.现网环境     http://appserver.1dian.la/appServer/interface
 4.本地联调环境  http://192.168.40.70:8080/appServer/interface
 5.预发环境     http://yufa.appserver.1dian.la/appServer/interface
 */


/*
 *********************************************************************************
 *                                                                                *
 * 1、切换release模式、更改版本号、线上环境、生产证书                                    *
 * 2、Archive->upload                                                             *
 *                                                                                *
 ********************************************************************************* 
 */

#define GJTest (NO)

#define TestPhoneNum (IS_IPHONE4?@"13068703912":@"13068703914")

//切换网络环境 (1:开发环境, 2:测试环境, 3:现网环境, 4:本地联调环境--(70:飞勇 91:震宇), 5:预发环境

#define RequestType 2


#define BaseUrl                (^NSString *(){\
                                            switch(RequestType)\
                                            {\
                                             case 1:\
                                                return @"http://192.168.1.121:9101/appServer/interface";\
                                             case 2:\
                                                return @"http://192.168.1.201:8080/appServer/interface";\
                                             case 3:\
                                                return @"http://appserver.1dian.la/appServer/interface";\
                                             case 4:\
                                                return @"http://192.168.40.70:8080/appServer/interface";\
                                             case 5:\
                                                return @"http://yufa.appserver.1dian.la/appServer/interface";\
                                             default: return @"";\
                                            }\
                                            }()\
                                )\

//网络请求拼接url
#define API(name) [BaseUrl stringByAppendingString:(name)]

#pragma mark -=========================== H5页面(不区分环境) ==============================

/** 分享地址 */
#define Url_shareAddress                @"http://wechatest.1dian.la/Business/Index/index"
/** 二维码扫描地址 */
#define Url_scanAddress                 @"http://www.1dian.la/pcreg.php?referUser=(shopID)"
/** 入驻协议地址 */
#define Url_registerTreaty              @"http://www.1dian.la/law02.php"
/** 下载授权书模板 */
#define Authorize_Url                   @"http://picture.1dian.la/授权书.doc"

/** AppStore下载地址 */
//#define Url_AppStore                   @"https://itunes.apple.com/cn/app/yi-dian-chuan-qi/id874837730?mt=8"

//管家：1045129768 消费APP：874837730
#define  Url_AppStore                   @"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1045129768&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8"

/** 客服电话*/
#define GJCustomerNumber                (@"400-6399818")


//************************* 模块接口地址 **************************//


#pragma mark -=========================== 登录模块接口 ====================================

/** 登录 */
#define Url_shopLogin                   @"/shop/shopManageLogin"

/** 重置密码接口 */
#define Url_modifyPwd                   @"/user/modifyPwd"

/** 获取商铺详情接口 */
#define Url_getShopDetails              @"/shop/getShopDetails"

//根据手机号码查询会员是否存在
#define Url_getUser                     @"/shopManage/getUser"

//获取手机验证码接口
#define Url_getVeriCode                 @"/common/getVeriCode"

//注册接口
#define Url_register                    @"/user/register"

/** 获取所有省份接口 */
#define Url_getAllProvinces             @"/home/getAllProvinces"

/** 获取所有城市接口 */
#define Url_getCitis                    @"/home/getCitis"

/** 获取所有区接口 */
#define Url_getDistricts                @"/home/getDistricts"

/** 根据区县ID获取街道列表接口(乡镇) */
#define Url_getTowns                    @"/home/getTowns"

/** 获取栏目的下级栏目接口(行业分类) */
#define Url_getColumnInfo               @"/column/getColumnInfo"

/** 新增店铺接口 */
#define Url_addShopDetail               @"/shopManage/addShopDetail"

/** 更新店铺信息 */
#define Url_updateShopDetail            @"/shopManage/updateShopDetail"

/** 用户使用第三方支付接口。通知所有商家的在线系统 (非组合支付)*/
#define Url_payBy3rd                    @"/service/pay/payBy3rd"

/** 保证金充值*/
#define Url_fillBail                    @"/session/shop/fillBail"

#pragma mark -=========================== 收银台模块接口 ====================================

/** 店铺ID */
#define GJ_ShopId                           ([NSString stringWithFormat:@"%zd",[GJGlobalManager shareInstance].currentShopInfo.shop.shopId])

/** 收银机CU4 */
#define Url_getPayVeriCode                  @"/session/getPayVeriCode"
/** 订单详情 */
#define Url_getOrderDetail4CR               @"/session/order/getOrderDetail4CR"
/** 订单列表 */
#define Url_getAllOrderList                 @"/session/shop/getAllOrderList"
/** 店铺收银员 */
#define Url_getShopCashiers                 @"/shopManage/getShopCashiers"
/** 支付结果 */
#define Url_getPayResult                    @"/session/pay/getPayResult"
/** 店铺推荐会员 */
#define Url_getShopRefMembers               @"/shop/getShopRefMembers"
/** 获取平台奖励账单*/
#define Url_getBillStat                     @"/session/shop/getBillStat"

/** 收银明细(月) */
#define Url_getDayOrderStat                 @"/session/shop/getDayOrderStat"
/** 账户余额 */
#define Url_queryShopAccount                @"/shopManage/queryShopAccount"
/** 用户传奇宝余额是否充足 */
#define Url_isBalanceOk                     @"/session/isBalanceOk"
/** PU4 用户查询 */
#define Url_searchMember                    @"/session/user/searchMember"
/** 组合支付 */
#define Url_multiplePay                     @"/session/order/multiplePay"
/** 上传图片文件*/
#define Url_UploadImageFile                 @"/user/commonUploadFile"
/** 商铺账户账单明细（线上收入、平台返利）*/
#define Url_AccountBillDetails              @"/session/shop/getBillDetail"

/** 提现记录 */
#define Url_getShopWithdrawList             @"/session/shop/getShopWithdrawList"

#pragma mark -=========================== 员工管理接口 ====================================
/** 检验验证码 */
#define Url_checkVeriCode                  @"/common/checkVeriCode"

/** 增删改员工 */
#define Url_optShopCashier                 @"/shopManage/optShopCashier"

/** 删除员工 */
#define Url_delShopCashier                 @"/shopManage/delShopCashier"

/** 查询用户的银行卡接口 */
#define Url_getUserBankCards               @"/user/getUserBankCards"

/** 会员基本资料编辑时,可以单独绑定银行卡信息 */
#define Url_bindBankCard                   @"/user/bindBankCard"

/** 获取银行卡号的归属地信息 */
#define Url_getBankCardInfo                @"/session/pay/getBankCardInfo"

/** 会员可以单张解除绑定银行卡信息 */
#define Url_unbindBankCard                 @"/user/unbindBankCard"

/** 获取商铺商品接口 */
#define Url_getShopGoods                   @"/goods/getShopGoods"

/** 根据日期、收银员、支付方式查询销售统计接口。 */
#define Url_getShopSalestatistics          @"/shop/getShopSalestatistics"


#pragma mark -=========================== 商品管理接口 ====================================
/** 发布／修改商品*/
#define Url_updateGoods                     @"/session/goods/updateGoods"

/** 多规格商品列表*/
#define Url_getGoodsGroupGoodsList          @"/goods/getGoodsGroupGoodsList"

/** 获取商品分类*/
#define Url_getGoodsCategory                @"/session/goods/getGoodsCategory"

/** 添加/修改商品分类*/
#define Url_addGoodsCategory                @"/shopManage/addGoodsCategory"

/** 删除商品分类*/
#define url_delGoodsCategory                @"/shopManage/operateGoodsCategory"

/** 获取商品单位*/
#define Url_getGoodsUnitList                @"/session/goods/getGoodsUnitList"

/** 添加/修改商品单位*/
#define Url_updateGoodsUnit                 @"/session/goods/updateGoodsUnit"

/** 删除商品单位*/
#define url_delGoodsUnit                    @"/session/goods/delGoodsUnit"

/** 商品详情 */
#define url_getGoodsDetail                  @"/goods/getGoodsDetail"

/** 商品状态变更接口 */
#define url_updateGoodsInfo                 @"/session/goods/updateGoodsInfo"

/** 商品流水查询 */
#define url_getShopStorageDetail            @"/session/storage/getShopStorageDetail"


/** 商品条形码信息查询*/
#define url_baseCode                        @"http://apapia.manmanbuy.com/index_json.ashx?jsoncallback=%3F&methodName=getcode&code="
#define url_getGoodsCodeInfo(code)          [NSString stringWithFormat:@"%@%@",url_baseCode,code]

/** 书本条形码信息查询*/
#define url_getBookCodeInfo(code)           [NSString stringWithFormat:@"http://api.douban.com/v2/book/search?q=%@",code]

#pragma mark -=========================== 会员管理接口 ====================================
/** 获取店内会员列表*/
#define url_getMemberList                   @"/session/shopMember/queryShopMemberList"

/** 更新店内会员信息*/
#define url_updateShopMember                @"/session/shopMember/updateShopMember"

/** 获取店内会员详情*/
#define url_getMemberDetail                 @"/session/shopMember/getShopMemberDetail"

/** 获取店内会员消费充值账单*/
#define url_getMemberCardBill               @"/session/pay/getShopMemberCardBills"

/** 内会员卡充值接口 */
#define url_chargeShopMemberCard            @"/session/pay/chargeShopMemberCard"

/** 会员分组列表*/
#define url_getShopMemberInfo               @"/session/shopMember/getShopMemberInfo"

/** 发送祝福短信*/
#define url_sendSMS                         @"/session/common/sendSMS"

#pragma mark -=========================== 经营分析相关接口 ====================================
/** 经营分析商品销售统计*/
#define url_getGoodsSalestatistics          @"/goods/getGoodsSalestatistics"

/** 获取商铺营收统计详情接口 */
#define Url_shopIncomeStatDetail            @"/session/shop/shopIncomeStatDetail"

/** 会员消费统计*/
#define url_getMemberConsumerStat           @"/session/shopMember/getMemberConsumerStat"

/** 查询红包明细*/
#define url_getRedPacketDetail              @"/session/redPacket/getRedPacketDetail"

/** 账单明细*/
#define url_getBillDetailById               @"/session/shop/getBillDetailById"

#pragma mark -=========================== 优惠券相关接口 ====================================

/** 查询优惠券列表信息接口 */
#define Url_shopCouponList                  @"/session/shopCoupon/shopCouponList"

/** 对优惠券的状态进行修改以及优惠券的删除 */
#define Url_operateShopCoupon               @"/session/shopCoupon/operateShopCoupon"

/** 指定相应店内会员发送优惠券 */
#define Url_sendCoupon                      @"/session/shopCoupon/sendCoupon"

/** 查询优惠券详细信息接口 */
#define Url_shopCouponDetail                @"/session/shopCoupon/shopCouponDetail"

/** 发放店铺优惠券*/
#define url_shopSendCoupon                  @"/session/shopCoupon/sendCoupon"

/** 新增/修改优惠券*/
#define url_shopUpdateCoupon                @"/session/shopCoupon/updateShopCoupon"

/** 店铺优惠券领用明细*/
#define url_getCouponReceiveDetail          @"/session/shopCoupon/getCouponReceiveDetail"



//===================================================================================
#endif
